<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="UTF-8">
        <title>使用v-for</title>
    </head>
    <body>
        <!-- view层模版 -->
        <div id="app">
            <li v-for="item in items">
                {{item.message}}
            </li>


        </div>
        <!-- 导入vue.js -->
        <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script>
        <script>
            Vue.config.devtools = true
            let vm = new Vue({
                el: "#app",
                // model：数据
                data: {
                    items: [
                        {message: "hello"},
                        {message: "world"},
                        {message: "china"},
                        {message: "japan"},
                        {message: "usa"},
                        {message: "british"}
                    ]
                }
            });
        </script>
    </body>
</html>